* {
    padding: 0;
    margin: 0;
}

:root {
    --color-menu-bg: #fff;
    --font-color-mi: #000;
    --font-color-mi-hover: #1890ff;
    --color-bg-mi-hover: #ececec;
    --border-radius-mi: 2px;
    --transition-menu: 0.2s;
}


/* body {
    background: #e6e6e6;
} */

.content {
    min-height: 100vh;
    background: #e7e7e7;
}

.menu-box {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    letter-spacing: 0.5px;
    font-weight: 600;
    position: relative;
    width: fit-content;
    min-height: 100vh;
    padding: 6px 12px;
    background: var(--color-menu-bg);
    box-sizing: border-box;
}

.menu-box input[type='checkbox'] {
    display: none;
}


/* .menu {
    font-size: 18px;
    color: var(--font-color-mi);
    width: 220px;
    height: 100%;
    cursor: pointer;
    transition: width var(--transition-menu);
    overflow: hidden;
} */


/* .menu-box #menu-btn {
    这里的错误：
        已经把checkbox给隐藏起来 ， 然后用一个label标签代替它交互，所以实际上我们应该写的样式是label，而不是这个checkbox的
    position: absolute;
    right: 0;
    top: 48%;
} */

.menu-box>label {
    position: absolute;
    top: 48%;
    right: 0;
    transform: translateX(50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 0 4px 0px #000;
    background: var(--color-menu-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.menu-box>label:hover {
    color: var(--font-color-mi-hover);
    box-shadow: 0px 0px 2px 0px #000;
}

.menu-box>label>i {
    font-weight: 900;
    font-size: 20px;
    text-indent: -3px;
    transition: var(--transition-menu);
    transform: rotate(0deg);
}


/* 注意这里用大于号 不是加号 不然选择的选择器就不是i
.menu-box>input#menu-btn:checked+label+i {
    transform: rotate(180deg);
} */

.menu-box>input#menu-btn:checked+label>i {
    transform: rotate(180deg);
}

.menu-box>input#menu-btn:checked~.menu {
    width: 0;
}

.menu {
    position: relative;
    font-size: 18px;
    width: 220px;
    min-height: 100%;
    cursor: pointer;
    overflow: hidden;
    transition: 0.2s linear;
    color: var(--font-color-mi);
}

.menu h1 {
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
}

.menu .menu-item {
    overflow: hidden;
    width: 100%;
    padding: 5px 5px;
    font-size: 18px;
}

.menu .menu-item>label {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    border-radius: var(--border-radius-mi);
}

.menu .menu-item>label:hover {
    color: var(--font-color-mi-hover);
    cursor: pointer;
}

.menu .menu-item>label>i:first-child {
    flex: none;
    margin-right: 6px;
}

.menu .menu-item>label>i:last-child {
    position: absolute;
    flex: none;
    right: 10%;
    margin-right: 6px;
    transition: 0.2s;
}

.menu-item .menu-item-content {
    position: relative;
    height: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    transition: 0.2s linear;
}

.menu-item .menu-item-content span {
    display: block;
    width: 100%;
    height: 25px;
    padding: 5px 15px;
}

.menu .menu-item>input#menu-item1:checked~.menu-item-content {
    height: calc( 4 * 25px);
}

.menu .menu-item>input#menu-item1:checked+label>i:last-child {
    transform: rotate(-90deg);
}

.menu .menu-item>input#menu-item2:checked~.menu-item-content {
    height: calc( 4 * 25px);
}

.menu .menu-item>input#menu-item2:checked+label>i:last-child {
    transform: rotate(-90deg);
}

.menu .menu-item>input#menu-item3:checked~.menu-item-content {
    height: calc( 4 * 25px);
}

.menu .menu-item>input#menu-item3:checked+label>i:last-child {
    transform: rotate(-90deg);
}